]> git.saurik.com Git - apple/security.git/blob - Keychain Circle Notification/NSSet+compactDescription.m
Security-55471.tar.gz
[apple/security.git] / Keychain Circle Notification / NSSet+compactDescription.m
1 //
2 // NSSet+compactDescription.m
3 // KeychainMigrator
4 //
5 // Created by J Osborne on 3/21/13.
6 //
7 //
8
9 #import "NSSet+compactDescription.h"
10
11 @implementation NSSet (compactDescription)
12
13 -(NSString*)compactDescription
14 {
15 NSMutableArray *results = [NSMutableArray new];
16 for (id v in self) {
17 if ([v respondsToSelector:@selector(compactDescription)]) {
18 [results addObject:[v compactDescription]];
19 } else {
20 [results addObject:[v description]];
21 }
22 }
23 return [NSString stringWithFormat:@"[%@]", [results componentsJoinedByString:@", "]];
24 }
25
26 @end